export

suspend fun export(_: Nothing = nothing, block: DesignBlock = requireNotNull(editorContext.engine.scene.get()), mimeType: MimeType = MimeType.PDF, preExport: suspend Engine.() -> Unit = { // The engine instance is background engine here and has nothing to do with editorContext.engine. this.scene.getPages().forEach { this.block.setScopeEnabled(it, key = "layer/visibility", enabled = true) this.block.setVisible(it, visible = true) } }): ByteBuffer

A helper function that exports the block.

Return

the exported content as ByteBuffer.

Parameters

block

the design block that should be exported.

mimeType

the mime type to export to.

preExport

the block that should be run right before export on the background engine.